#include <stdio.h>
#include <task.h>

void *counter_task (void *arg) {
  int i;
  for (i = 0; i < 5;i++) {
    printf ("%d\n", i);
    task_cooperate ();
  }
  return NULL;
}

void *main_task (void *arg) {
  task_t t1, t2;
  task_create (&t1, counter_task, NULL);
  task_create (&t2, counter_task, NULL);
  return NULL;
}
